To use a scanner system etc. to read a document and store it as image data, it is necessary to accurately detect the document region from the read image. In general, with a flat bed type or automatic document feed type of scanner system, it is possible to easily distinguish between a document region and other regions by using a white color, black color, or other simple color backing. However, for example, when the color of the document region is the same as the color of the backing part, it may be impossible to accurately detect the document region.
Therefore, Japanese Laid-open Patent Publication No. 2007-335927 discloses an image processing apparatus which uses fluctuations in density of the image data which is obtained by reading the document as the basis to detect the position or size of the document. This image processing apparatus detects the difference in fluctuations in density of pixels in a sub scan direction and detects pixels where the difference of the fluctuations in density is a threshold value or more as positions of the document.
Further, Japanese Laid-open Patent Publication No. 2008-278318 discloses an image reading apparatus which uses electronic paper as the backing for a document. When reading a document, this image reading apparatus makes the electronic paper a bright color to read the document, makes the electronic paper a dark color to read the document, then uses the read images as the basis to detect the size of the document.
Further, Japanese Laid-open Patent Publication No. 2005-285010 discloses an image processing apparatus which utilizes the difference in grade of the background and document to detect the boundaries of the document. When the boundaries of the document cannot be detected, this image processing apparatus extracts ruled lines from the document and uses the ruled lines which have been extracted as the basis to determine the boundaries of the document.